package com.jeebey.mybatis.bean;

import java.io.Serializable;
import java.util.List;

import com.jeebey.mybatis.annotation.GeneratedPosition;
import com.jeebey.mybatis.annotation.GeneratedStrategy;
import com.jeebey.mybatis.annotation.GeneratedValue;
import com.jeebey.mybatis.annotation.Id;
import com.jeebey.mybatis.annotation.Table;
import com.jeebey.mybatis.annotation.Transient;

@SuppressWarnings("serial")
@Table(name = "t_group")
public class Group implements Serializable {
	@Id
	//@GeneratedValue(strategy = GeneratedStrategy.SHORTUUID,referType=String.class)
	//@GeneratedValue(strategy = GeneratedStrategy.UUID)
	//@GeneratedValue(strategy = GeneratedStrategy.JDBC)
	@GeneratedValue(strategy = GeneratedStrategy.GENERATOR,generator="select SUBSTR(RAND(),3)",position=GeneratedPosition.BEFORE,referType=String.class)
	//@GeneratedValue(strategy = GeneratedStrategy.GENERATOR,generator="select '1211'",position=GeneratedPosition.BEFORE,referType=String.class)
	private String id;
	private String name;
	
	public Group(){
		
	}
	
	public Group(String id){
		this.id=id;
	}
	
	@Transient
	private List<User> children;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<User> getChildren() {
		return children;
	}

	public void setChildren(List<User> children) {
		this.children = children;
	}

}
